package com.syncshot.androidapp.adapters;

import android.content.Context;
import android.content.res.Resources;
import android.view.View;

public abstract class AbstractViewHolder<TContent> {

    private View       mRootView;


    public void setRootView(View rootView) {
        mRootView = rootView;
    }

    protected View getRootView() {
        return mRootView;
    }


    protected View findViewById(int id) {
        return mRootView.findViewById(id);
    }

    protected Context getContext() {
        if (mRootView != null) {
            return mRootView.getContext();
        }
        return null;
    }

    public abstract void setContent(Resources res, int position, TContent content);

}
